package sc;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;

public class UnknownIPPanel extends BasePanel
{
	private static final long serialVersionUID = 1L;
	private final static Font nameFont;
	private final static Font messageFont;

	static
	{
		nameFont = new Font("SansSerif", Font.BOLD, 14);
		messageFont = new Font("SansSerif", Font.PLAIN, 12);
	}
	
	private String name;

	public UnknownIPPanel(String name, String sortvalue)
	{
		this.name = name;
		setPreferredSize(new Dimension(100, 110));
		sortValue(sortvalue);
	}
    
	@Override
	public void paintComponent(Graphics g)
    {
		int w = getWidth();
		width(w);
		
		// Tile the background image
		Image bg = Images.getImage("/images/panel.png");
		for (int x = 0; x < w; x += 37)
			g.drawImage(bg, x, 0, this);
		
		g.setFont(nameFont);
		g.setColor(Color.BLACK);
		g.drawString(name, 5, 15);
		
		g.setFont(messageFont);
		g.setColor(Color.BLACK);
		g.drawString("You have been denied access, ", 5, 40);
		g.drawString("please log into the Harlequin ", 5, 60);
		g.drawString("forums then reload SysBox to ", 5, 80);
		g.drawString("update IP matching security.", 5, 100);
	}

}
